{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=351
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,a:longint;
	ans:int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(a);
ans:=1;
for i:=2 to a do
	ans:=ans*i;
write(ans);
end.